package com.zbb.base.execption;

public class ZbbBackException extends RuntimeException {
    private static final long serialVersionUID = 5565760508056698922L;
    private String errMessage;

    public ZbbBackException() {
        super();
    }

    public ZbbBackException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public static void cast(CommonError commonError) {
        throw new ZbbBackException(commonError.getErrMessage());
    }

    public static void cast(String errMessage) {
        throw new ZbbBackException(errMessage);
    }
}
